<?php
include_once ("includes/connect.php");
include_once ("includes/function.php");

$id = $_REQUEST["id"];

$task = $_REQUEST["task"];

$cheque_no = $_REQUEST["cheque_no"];
?>

<script type="text/javascript">
    $(document).ready(function() {
        $("#i_date").datepicker({
            dateFormat: "yy-mm-dd",
            showButtonPanel: true
        });

        $("#save_menus").click(function() {
            event.preventDefault();

            var i_date = $("#i_date").val();
            var task = "<?php echo $task; ?>";
            var id = "<?php echo $id; ?>";
//            var payment_method = $("#payment_method:checked").val();

            $.post(
                    'pet_status_process.php', {
                        task: task
                        , id: id
                        , i_date: i_date
//                        , cheque_no: cheque_no
//                        , payment_method: payment_method
                    }, function(data) {
                window.location.href = "index.php?pages=pet";

//                if (task == "approvedCheque") {
//                    window.location.href = "index.php?pages=paid_utility";
//                } else if (task == "approved") {
//                    //alert(data);
//                    window.location.href = "index.php?pages=verify_approved_utility";
//                }


            });
        });
    });
</script>

<p>
    <label>วันที่อนุมัติ</label>
    <input class="span3" type="text" id="i_date" name="i_date" />

<!--    <label>เลือกวิธีการจ่ายเงิน</label>
    <label class="radio inline">
        <input type="radio" id="payment_method" name="payment_method" value="cash" > เงินสด
    </label>
    <label class="radio inline">
        <input type="radio" id="payment_method" name="payment_method" value="cheque" checked> เช็ค
    </label>
    <label class="radio inline">
        <input type="radio" id="payment_method" name="payment_method" value="transfer"> โอนเงิน
    </label>-->

</p>
<div class="form-actions">
    <button class="btn btn-primary" id="save_menus">บันทึก</button>
    <a class="btn close-dialog"><i class="icon-remove"></i> ยกเลิก</a>

</div>
